<?php
use yii\helpers\Html;
$this->registerJsFile('/status/js/table_base.js',[ 'depends'=> 'backend\assets\AppAsset']);
?>
<style>
	table tbody tr th{text-align: center; background-color: #FC9D9A; color: #fff;}
	table tbody tr td{text-align: center;}
</style>
<div class="ibox-title">
	<h5>角色管理列表</h5>
</div>
<div class="ibox-content timeline">
	<div class="box-create">
		<?= Html::a('添加角色', ['addroule'], ['class' => 'btn btn-primary langse'])?>
		<!--<a href="#" class="btn btn-primary langse">
			<span>添加角色</span></a>-->
	</div>
	<table class="table  table-bordered" style="background:#fff; margin-top:20px;"  align="center">
		<tr>
			<th>角色类型</th>
			<th>操作</th>
		</tr>
		<?php  foreach($pro_data as $val){ ?>
		<tr>
            <td class="center"><?=$val->name?></td>
			<td class="center">
				<?= Html::a('权限分配', ['setroule', 'name' => $val->name], [
					'data' => [	'method' => 'post'],
					'class' => 'btn btn-info',
				])?>
                <?= Html::a('删除', ['roledel', 'name' => $val->name], [
                    'data' => [
                    'confirm' => '确认要删除吗？',
                    'method'  => 'post',
                    ],
                    'class'=> 'btn btn-danger',
                ])?>
	        </td>
		</tr>
	<?php } ?>
	</table>
</div>
<?php
	$js =<<<JS

JS;
$this->registerJs($js);
?>
